.class public Lcom/baidu/mobads/component/XNativeView;
.super Landroid/widget/RelativeLayout;
.source "SourceFile"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/baidu/mobads/component/XNativeView$INativeViewClickListener;
    }
.end annotation


# static fields
.field private static final COVER_PIC_ID:I = 0x11

.field private static final LOADING_VIEW_ID:I = 0x12

.field private static final PAUSE_ID:I = 0x10

.field private static final PLAY_ICON_STRING:Ljava/lang/String; = "iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAYAAADnRuK4AAAABHNCSVQICAgIfAhkiAAADT5JREFU\neJztnXtsleUdxz897YFKL1AQKEUFKsjqAqgILotIzBYQdERilqAsMTAuIoMNGEtmt8G0cUuj/GFM\nDDFk/lGRqBXZisCMiGBAWjsuQS4ttFx6A6QX2kLpoefsj985tLQ97bm873ne9z3PJznhWM/lC8+3\nz+33e55fAvGHC0gHBgND/H8OBNxdHgO6PAfw+B/tXZ57gFtAE9Do//M64I3R38MSJKgWYDJuIBMY\nBWQghklDTGQGXsRETUADUAvUIWZzJE4zUCIwEsgCRgPDMc8soeIFrgLVQA1wGehQqshAnGAgNzAO\nGI/0NIlq5fRLB9IzlQPnsXnvZFcDJSA9zATEPElq5UTMbaASKEN6J59aOeFjNwOlAzmIcQYp1mI0\nrcBZ4BQyj7IFdjHQEOBRZJiyi+ZI8SFGOoKs7iyN1RvjXsQ441QLUUQFcBT4UbWQYFjVQMOBqcAD\nqoVYhItAKbKasxRWM9BAYDoyz9H05BRQjGxgWgKrGCgBeAh4AkhWrMXqtAGHkZWb8lWbFQw0DHgS\n2QDUhE4d8C1Qr1KESgO5kHnOI4p12BkfMskuRVEMTlXDpQC/QOJUmuipA75C9pJiiopt//uBucje\njsYYUpE5ZD0x3oSMpYFcwDRgBvYNPViZJGSHPhGJtcVkgh0rAyUDc5CdZI25ZCLZCBeQWJupxMJA\nqcCvkF1lTWxIBcYgJmo384vMNtBQxDxpJn+PpifJ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g7dE1mFDsQ8hmeXmjVfaUKuARln4ndoQqMdGbZMqQpkZuO2II4fi16dqSKw2jJsztMd\ns3uHm8ixkPvR+0SxphEDV1vBiMXw0o6kCIwEUmPwfRpZDX+BAfs8/RGr+clt5HisCx07M5ujwD5i\nVIkylhNcHzKRu4IMaXFzC1qMaEOi6jG9GEPFCilwccMI9JBmFHXATkycLAdD1RLbgwxpCciQpjcd\nI8OHpKF+g8w1Y44VGm4ocrGnnhuFRx2SAF+vUoQVDASi4yHkZjS93O+bNuTcVshHb8zEKgYKMBCY\nDuSoFmJRTiInRi1T1M5qBgowHJgKPKBaiEW4iGQOxnyS3B9WNVCAYcCjQLZqIYqoQCbJfV6xohKr\nGyjAEKSi4gTsozlSfMgK9Sh93AxmFezWGGnAw0jSWopiLUbTihjnFEEutLQidjNQgAQgC1m5jcO+\nu9q3kWGqHKnBZbt7B+xqoK64kZSRCciZfavnHwXKapUjdUlsXT7TCQbqSiIS9c/yP0agPivSi8T/\navyPQGE/R+A0A3XHjexwjwIygMFAOuaZyovE+hr9j1pkxzgmkXEVON1AveFCJuNDEEMNRna/3b08\nAgVn2hETdH+0Iem7TYhhmongggI7838jQjJwZ8OEVQAAAABJRU5ErkJggg==\n"

.field private static final TAG:Ljava/lang/String; = "XNativeView"


# instance fields
.field private mAdLogger:Lcom/baidu/mobads/utils/q;

.field private mCoverPic:Landroid/widget/ImageView;

.field private mCurrentNativeItem:Lcom/baidu/mobad/feeds/XAdNativeResponse;

.field public mLoadingView:Landroid/view/View;

.field private mNativeViewListener:Lcom/baidu/mobads/component/XNativeView$INativeViewClickListener;

.field private mPauseBtn:Landroid/widget/ImageView;

.field private mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

.field private videoMute:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    const/4 p1, 0x1

    .line 2
    iput-boolean p1, p0, Lcom/baidu/mobads/component/XNativeView;->videoMute:Z

    .line 3
    new-instance p1, Lcom/baidu/mobads/utils/q;

    invoke-direct {p1}, Lcom/baidu/mobads/utils/q;-><init>()V

    iput-object p1, p0, Lcom/baidu/mobads/component/XNativeView;->mAdLogger:Lcom/baidu/mobads/utils/q;

    const-string p1, "#000000"

    .line 4
    invoke-static {p1}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result p1

    invoke-virtual {p0, p1}, Landroid/widget/RelativeLayout;->setBackgroundColor(I)V

    .line 5
    invoke-static {}, Lcom/baidu/mobads/component/XNativeViewManager;->getInstance()Lcom/baidu/mobads/component/XNativeViewManager;

    move-result-object p1

    invoke-virtual {p1, p0}, Lcom/baidu/mobads/component/XNativeViewManager;->addItem(Lcom/baidu/mobads/component/XNativeView;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    .line 6
    invoke-direct {p0, p1, p2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 p1, 0x1

    .line 7
    iput-boolean p1, p0, Lcom/baidu/mobads/component/XNativeView;->videoMute:Z

    .line 8
    new-instance p1, Lcom/baidu/mobads/utils/q;

    invoke-direct {p1}, Lcom/baidu/mobads/utils/q;-><init>()V

    iput-object p1, p0, Lcom/baidu/mobads/component/XNativeView;->mAdLogger:Lcom/baidu/mobads/utils/q;

    const-string p1, "#000000"

    .line 9
    invoke-static {p1}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result p1

    invoke-virtual {p0, p1}, Landroid/widget/RelativeLayout;->setBackgroundColor(I)V

    .line 10
    invoke-static {}, Lcom/baidu/mobads/component/XNativeViewManager;->getInstance()Lcom/baidu/mobads/component/XNativeViewManager;

    move-result-object p1

    invoke-virtual {p1, p0}, Lcom/baidu/mobads/component/XNativeViewManager;->addItem(Lcom/baidu/mobads/component/XNativeView;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0

    .line 11
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 p1, 0x1

    .line 12
    iput-boolean p1, p0, Lcom/baidu/mobads/component/XNativeView;->videoMute:Z

    .line 13
    new-instance p1, Lcom/baidu/mobads/utils/q;

    invoke-direct {p1}, Lcom/baidu/mobads/utils/q;-><init>()V

    iput-object p1, p0, Lcom/baidu/mobads/component/XNativeView;->mAdLogger:Lcom/baidu/mobads/utils/q;

    const-string p1, "#000000"

    .line 14
    invoke-static {p1}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result p1

    invoke-virtual {p0, p1}, Landroid/widget/RelativeLayout;->setBackgroundColor(I)V

    .line 15
    invoke-static {}, Lcom/baidu/mobads/component/XNativeViewManager;->getInstance()Lcom/baidu/mobads/component/XNativeViewManager;

    move-result-object p1

    invoke-virtual {p1, p0}, Lcom/baidu/mobads/component/XNativeViewManager;->addItem(Lcom/baidu/mobads/component/XNativeView;)V

    return-void
.end method

.method static synthetic access$000(Lcom/baidu/mobads/component/XNativeView;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/baidu/mobads/component/XNativeView;->hideCoverPic()V

    return-void
.end method

.method private hideCoverPic()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mPauseBtn:Landroid/widget/ImageView;

    const/4 v1, 0x4

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 3
    :cond_0
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mCoverPic:Landroid/widget/ImageView;

    if-eqz v0, :cond_1

    .line 4
    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 5
    :cond_1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mLoadingView:Landroid/view/View;

    if-eqz v0, :cond_2

    .line 6
    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    :cond_2
    return-void
.end method

.method private hidePauseBtn()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mPauseBtn:Landroid/widget/ImageView;

    if-eqz v0, :cond_0

    const/4 v1, 0x4

    .line 2
    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 3
    :cond_0
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mCoverPic:Landroid/widget/ImageView;

    const/4 v1, 0x0

    if-eqz v0, :cond_1

    .line 4
    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 5
    :cond_1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mLoadingView:Landroid/view/View;

    if-eqz v0, :cond_2

    .line 6
    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    :cond_2
    return-void
.end method

.method private initAdVideoView()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    if-nez v0, :cond_0

    return-void

    :cond_0
    const/4 v1, 0x1

    .line 2
    invoke-virtual {v0, v1}, Lcom/baidu/mobads/component/FeedPortraitVideoView;->setCanClickVideo(Z)V

    .line 3
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    iget-object v1, p0, Lcom/baidu/mobads/component/XNativeView;->mCurrentNativeItem:Lcom/baidu/mobad/feeds/XAdNativeResponse;

    invoke-virtual {v0, v1}, Lcom/baidu/mobads/component/FeedPortraitVideoView;->setAdData(Lcom/baidu/mobad/feeds/XAdNativeResponse;)V

    .line 4
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    iget-boolean v1, p0, Lcom/baidu/mobads/component/XNativeView;->videoMute:Z

    invoke-virtual {v0, v1}, Lcom/baidu/mobads/component/FeedPortraitVideoView;->setVideoMute(Z)V

    return-void
.end method

.method private isVisible(Landroid/view/View;I)Z
    .locals 8

    const/4 v0, 0x0

    if-eqz p1, :cond_3

    .line 1
    invoke-virtual {p1}, Landroid/view/View;->getVisibility()I

    move-result v1

    if-nez v1, :cond_3

    .line 2
    invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object v1

    if-nez v1, :cond_0

    goto :goto_0

    .line 3
    :cond_0
    new-instance v1, Landroid/graphics/Rect;

    invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V

    .line 4
    invoke-virtual {p1, v1}, Landroid/view/View;->getGlobalVisibleRect(Landroid/graphics/Rect;)Z

    move-result v2

    if-nez v2, :cond_1

    return v0

    .line 5
    :cond_1
    invoke-virtual {v1}, Landroid/graphics/Rect;->height()I

    move-result v2

    int-to-long v2, v2

    .line 6
    invoke-virtual {v1}, Landroid/graphics/Rect;->width()I

    move-result v1

    int-to-long v4, v1

    mul-long v2, v2, v4

    .line 7
    invoke-virtual {p1}, Landroid/view/View;->getHeight()I

    move-result v1

    int-to-long v4, v1

    invoke-virtual {p1}, Landroid/view/View;->getWidth()I

    move-result p1

    int-to-long v6, p1

    mul-long v4, v4, v6

    const-wide/16 v6, 0x0

    cmp-long p1, v4, v6

    if-gtz p1, :cond_2

    return v0

    :cond_2
    const-wide/16 v6, 0x64

    mul-long v2, v2, v6

    int-to-long p1, p2

    mul-long p1, p1, v4

    cmp-long v1, v2, p1

    if-ltz v1, :cond_3

    const/4 v0, 0x1

    :cond_3
    :goto_0
    return v0
.end method

.method private play()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    if-eqz v0, :cond_0

    .line 2
    invoke-direct {p0}, Lcom/baidu/mobads/component/XNativeView;->initAdVideoView()V

    .line 3
    invoke-direct {p0}, Lcom/baidu/mobads/component/XNativeView;->hidePauseBtn()V

    .line 4
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    invoke-virtual {v0}, Lcom/baidu/mobads/component/FeedPortraitVideoView;->play()V

    :cond_0
    return-void
.end method

.method private renderView()V
    .locals 4

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mCurrentNativeItem:Lcom/baidu/mobad/feeds/XAdNativeResponse;

    if-nez v0, :cond_0

    return-void

    .line 2
    :cond_0
    invoke-virtual {v0}, Lcom/baidu/mobad/feeds/XAdNativeResponse;->getMaterialType()Lcom/baidu/mobad/feeds/NativeResponse$MaterialType;

    move-result-object v0

    .line 3
    iget-object v1, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    if-nez v1, :cond_1

    .line 4
    new-instance v1, Lcom/baidu/mobads/component/FeedPortraitVideoView;

    invoke-virtual {p0}, Landroid/widget/RelativeLayout;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/baidu/mobads/component/FeedPortraitVideoView;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    .line 5
    new-instance v2, Landroid/widget/RelativeLayout$LayoutParams;

    const/4 v3, -0x1

    invoke-direct {v2, v3, v3}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {p0, v1, v2}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 6
    iget-object v1, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    new-instance v2, Lcom/baidu/mobads/component/a;

    invoke-direct {v2, p0}, Lcom/baidu/mobads/component/a;-><init>(Lcom/baidu/mobads/component/XNativeView;)V

    invoke-virtual {v1, v2}, Lcom/baidu/mobads/component/FeedPortraitVideoView;->setFeedPortraitListener(Lcom/baidu/mobads/component/IFeedPortraitListener;)V

    .line 7
    :cond_1
    sget-object v1, Lcom/baidu/mobad/feeds/NativeResponse$MaterialType;->NORMAL:Lcom/baidu/mobad/feeds/NativeResponse$MaterialType;

    if-ne v0, v1, :cond_2

    .line 8
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    iget-object v1, p0, Lcom/baidu/mobads/component/XNativeView;->mCurrentNativeItem:Lcom/baidu/mobad/feeds/XAdNativeResponse;

    invoke-virtual {v0, v1}, Lcom/baidu/mobads/component/FeedPortraitVideoView;->showNormalPic(Lcom/baidu/mobad/feeds/XAdNativeResponse;)V

    goto :goto_0

    .line 9
    :cond_2
    sget-object v1, Lcom/baidu/mobad/feeds/NativeResponse$MaterialType;->VIDEO:Lcom/baidu/mobad/feeds/NativeResponse$MaterialType;

    if-ne v0, v1, :cond_3

    .line 10
    invoke-direct {p0}, Lcom/baidu/mobads/component/XNativeView;->showView()V

    :cond_3
    :goto_0
    return-void
.end method

.method private shouldAutoPlay()Z
    .locals 6

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mCurrentNativeItem:Lcom/baidu/mobad/feeds/XAdNativeResponse;

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/baidu/mobad/feeds/XAdNativeResponse;->isAutoPlay()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    .line 2
    :goto_0
    iget-object v3, p0, Lcom/baidu/mobads/component/XNativeView;->mCurrentNativeItem:Lcom/baidu/mobad/feeds/XAdNativeResponse;

    if-eqz v3, :cond_2

    invoke-virtual {v3}, Lcom/baidu/mobad/feeds/XAdNativeResponse;->isNonWifiAutoPlay()Z

    move-result v3

    if-eqz v3, :cond_1

    goto :goto_1

    :cond_1
    const/4 v3, 0x0

    goto :goto_2

    :cond_2
    :goto_1
    const/4 v3, 0x1

    .line 3
    :goto_2
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v4

    invoke-virtual {v4}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getSystemUtils()Lcom/baidu/mobads/interfaces/utils/IXAdSystemUtils;

    move-result-object v4

    .line 4
    invoke-virtual {p0}, Landroid/widget/RelativeLayout;->getContext()Landroid/content/Context;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v5

    invoke-interface {v4, v5}, Lcom/baidu/mobads/interfaces/utils/IXAdSystemUtils;->isWifiConnected(Landroid/content/Context;)Ljava/lang/Boolean;

    move-result-object v4

    if-eqz v0, :cond_3

    .line 5
    invoke-virtual {v4}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-nez v0, :cond_5

    :cond_3
    if-eqz v3, :cond_4

    invoke-virtual {v4}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-nez v0, :cond_4

    goto :goto_3

    :cond_4
    const/4 v1, 0x0

    :cond_5
    :goto_3
    return v1
.end method

.method private showView()V
    .locals 4

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mCoverPic:Landroid/widget/ImageView;

    if-nez v0, :cond_0

    .line 2
    new-instance v0, Landroid/widget/ImageView;

    invoke-virtual {p0}, Landroid/widget/RelativeLayout;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mCoverPic:Landroid/widget/ImageView;

    .line 3
    sget-object v1, Landroid/widget/ImageView$ScaleType;->CENTER_CROP:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 4
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mCoverPic:Landroid/widget/ImageView;

    const/16 v1, 0x11

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setId(I)V

    .line 5
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mCoverPic:Landroid/widget/ImageView;

    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    const/4 v2, -0x1

    invoke-direct {v1, v2, v2}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {p0, v0, v1}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 6
    :cond_0
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mCoverPic:Landroid/widget/ImageView;

    if-eqz v0, :cond_1

    .line 7
    invoke-static {}, Lcom/baidu/mobads/c/a;->a()Lcom/baidu/mobads/c/a;

    move-result-object v0

    iget-object v1, p0, Lcom/baidu/mobads/component/XNativeView;->mCoverPic:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/baidu/mobads/component/XNativeView;->mCurrentNativeItem:Lcom/baidu/mobad/feeds/XAdNativeResponse;

    invoke-virtual {v2}, Lcom/baidu/mobad/feeds/XAdNativeResponse;->getImageUrl()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/baidu/mobads/c/a;->a(Landroid/widget/ImageView;Ljava/lang/String;)V

    .line 8
    :cond_1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mPauseBtn:Landroid/widget/ImageView;

    const/16 v1, 0xd

    if-nez v0, :cond_2

    .line 9
    new-instance v0, Landroid/widget/ImageView;

    invoke-virtual {p0}, Landroid/widget/RelativeLayout;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v0, v2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mPauseBtn:Landroid/widget/ImageView;

    .line 10
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v2

    invoke-virtual {v2}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getBitmapUtils()Lcom/baidu/mobads/interfaces/utils/IXAdBitmapUtils;

    move-result-object v2

    const-string v3, "iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAYAAADnRuK4AAAABHNCSVQICAgIfAhkiAAADT5JREFU\neJztnXtsleUdxz897YFKL1AQKEUFKsjqAqgILotIzBYQdERilqAsMTAuIoMNGEtmt8G0cUuj/GFM\nDDFk/lGRqBXZisCMiGBAWjsuQS4ttFx6A6QX2kLpoefsj985tLQ97bm873ne9z3PJznhWM/lC8+3\nz+33e55fAvGHC0gHBgND/H8OBNxdHgO6PAfw+B/tXZ57gFtAE9Do//M64I3R38MSJKgWYDJuIBMY\nBWQghklDTGQGXsRETUADUAvUIWZzJE4zUCIwEsgCRgPDMc8soeIFrgLVQA1wGehQqshAnGAgNzAO\nGI/0NIlq5fRLB9IzlQPnsXnvZFcDJSA9zATEPElq5UTMbaASKEN6J59aOeFjNwOlAzmIcQYp1mI0\nrcBZ4BQyj7IFdjHQEOBRZJiyi+ZI8SFGOoKs7iyN1RvjXsQ441QLUUQFcBT4UbWQYFjVQMOBqcAD\nqoVYhItAKbKasxRWM9BAYDoyz9H05BRQjGxgWgKrGCgBeAh4AkhWrMXqtAGHkZWb8lWbFQw0DHgS\n2QDUhE4d8C1Qr1KESgO5kHnOI4p12BkfMskuRVEMTlXDpQC/QOJUmuipA75C9pJiiopt//uBucje\njsYYUpE5ZD0x3oSMpYFcwDRgBvYNPViZJGSHPhGJtcVkgh0rAyUDc5CdZI25ZCLZCBeQWJupxMJA\nqcCvkF1lTWxIBcYgJmo384vMNtBQxDxpJn+PpifJwINAFXDTrC8x00CZwLPojUGVuJFpQx3QY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QqMdGbZMqQpkZuO2II4fi16dqSKw2jJsztMd\ns3uHm8ixkPvR+0SxphEDV1vBiMXw0o6kCIwEUmPwfRpZDX+BAfs8/RGr+clt5HisCx07M5ujwD5i\nVIkylhNcHzKRu4IMaXFzC1qMaEOi6jG9GEPFCilwccMI9JBmFHXATkycLAdD1RLbgwxpCciQpjcd\nI8OHpKF+g8w1Y44VGm4ocrGnnhuFRx2SAF+vUoQVDASi4yHkZjS93O+bNuTcVshHb8zEKgYKMBCY\nDuSoFmJRTiInRi1T1M5qBgowHJgKPKBaiEW4iGQOxnyS3B9WNVCAYcCjQLZqIYqoQCbJfV6xohKr\nGyjAEKSi4gTsozlSfMgK9Sh93AxmFezWGGnAw0jSWopiLUbTihjnFEEutLQidjNQgAQgC1m5jcO+\nu9q3kWGqHKnBZbt7B+xqoK64kZSRCciZfavnHwXKapUjdUlsXT7TCQbqSiIS9c/yP0agPivSi8T/\navyPQGE/R+A0A3XHjexwjwIygMFAOuaZyovE+hr9j1pkxzgmkXEVON1AveFCJuNDEEMNRna/3b08\nAgVn2hETdH+0Iem7TYhhmongggI7838jQjJwZ8OEVQAAAABJRU5ErkJggg==\n"

    invoke-interface {v2, v3}, Lcom/baidu/mobads/interfaces/utils/IXAdBitmapUtils;->string2bitmap(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v2

    .line 11
    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    .line 12
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mPauseBtn:Landroid/widget/ImageView;

    sget-object v2, Landroid/widget/ImageView$ScaleType;->FIT_XY:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 13
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mPauseBtn:Landroid/widget/ImageView;

    const/16 v2, 0x10

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setId(I)V

    .line 14
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mPauseBtn:Landroid/widget/ImageView;

    invoke-virtual {v0, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 15
    new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;

    const/16 v2, 0x78

    invoke-direct {v0, v2, v2}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    .line 16
    invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    .line 17
    iget-object v2, p0, Lcom/baidu/mobads/component/XNativeView;->mPauseBtn:Landroid/widget/ImageView;

    invoke-virtual {p0, v2, v0}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 18
    :cond_2
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mLoadingView:Landroid/view/View;

    if-nez v0, :cond_3

    .line 19
    new-instance v0, Landroid/widget/ProgressBar;

    invoke-virtual {p0}, Landroid/widget/RelativeLayout;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v0, v2}, Landroid/widget/ProgressBar;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mLoadingView:Landroid/view/View;

    .line 20
    new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;

    const/4 v2, -0x2

    invoke-direct {v0, v2, v2}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    .line 21
    invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    .line 22
    iget-object v1, p0, Lcom/baidu/mobads/component/XNativeView;->mLoadingView:Landroid/view/View;

    invoke-virtual {v1, v0}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 23
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mLoadingView:Landroid/view/View;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 24
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mLoadingView:Landroid/view/View;

    invoke-virtual {p0, v0}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    .line 25
    :cond_3
    invoke-virtual {p0}, Lcom/baidu/mobads/component/XNativeView;->handleCover()V

    return-void
.end method


# virtual methods
.method public handleCover()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mCoverPic:Landroid/widget/ImageView;

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 3
    :cond_0
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mPauseBtn:Landroid/widget/ImageView;

    if-eqz v0, :cond_1

    .line 4
    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 5
    :cond_1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mLoadingView:Landroid/view/View;

    if-eqz v0, :cond_2

    const/4 v1, 0x4

    .line 6
    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    :cond_2
    return-void
.end method

.method protected onAttachedToWindow()V
    .locals 1

    .line 1
    invoke-super {p0}, Landroid/widget/RelativeLayout;->onAttachedToWindow()V

    .line 2
    invoke-static {}, Lcom/baidu/mobads/component/XNativeViewManager;->getInstance()Lcom/baidu/mobads/component/XNativeViewManager;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/baidu/mobads/component/XNativeViewManager;->addItem(Lcom/baidu/mobads/component/XNativeView;)V

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 2

    .line 1
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    const/16 v1, 0x10

    if-eq v0, v1, :cond_0

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result p1

    const/16 v0, 0x11

    if-ne p1, v0, :cond_3

    .line 2
    :cond_0
    iget-object p1, p0, Lcom/baidu/mobads/component/XNativeView;->mNativeViewListener:Lcom/baidu/mobads/component/XNativeView$INativeViewClickListener;

    if-eqz p1, :cond_1

    .line 3
    invoke-interface {p1, p0}, Lcom/baidu/mobads/component/XNativeView$INativeViewClickListener;->onNativeViewClick(Lcom/baidu/mobads/component/XNativeView;)V

    .line 4
    :cond_1
    iget-object p1, p0, Lcom/baidu/mobads/component/XNativeView;->mCurrentNativeItem:Lcom/baidu/mobad/feeds/XAdNativeResponse;

    invoke-virtual {p1}, Lcom/baidu/mobad/feeds/XAdNativeResponse;->isDownloadApp()Z

    move-result p1

    if-eqz p1, :cond_2

    .line 5
    iget-object p1, p0, Lcom/baidu/mobads/component/XNativeView;->mCurrentNativeItem:Lcom/baidu/mobad/feeds/XAdNativeResponse;

    invoke-virtual {p1, p0}, Lcom/baidu/mobad/feeds/XAdNativeResponse;->handleClick(Landroid/view/View;)V

    .line 6
    invoke-direct {p0}, Lcom/baidu/mobads/component/XNativeView;->play()V

    goto :goto_0

    .line 7
    :cond_2
    iget-object p1, p0, Lcom/baidu/mobads/component/XNativeView;->mCurrentNativeItem:Lcom/baidu/mobad/feeds/XAdNativeResponse;

    invoke-virtual {p1, p0}, Lcom/baidu/mobad/feeds/XAdNativeResponse;->handleClick(Landroid/view/View;)V

    :cond_3
    :goto_0
    return-void
.end method

.method protected onDetachedFromWindow()V
    .locals 1

    .line 1
    invoke-super {p0}, Landroid/widget/RelativeLayout;->onDetachedFromWindow()V

    .line 2
    invoke-static {}, Lcom/baidu/mobads/component/XNativeViewManager;->getInstance()Lcom/baidu/mobads/component/XNativeViewManager;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/baidu/mobads/component/XNativeViewManager;->removeNativeView(Lcom/baidu/mobads/component/XNativeView;)V

    return-void
.end method

.method public onScroll()V
    .locals 1

    const/16 v0, 0x32

    .line 1
    invoke-direct {p0, p0, v0}, Lcom/baidu/mobads/component/XNativeView;->isVisible(Landroid/view/View;I)Z

    move-result v0

    if-nez v0, :cond_0

    .line 2
    invoke-virtual {p0}, Lcom/baidu/mobads/component/XNativeView;->pause()V

    :cond_0
    return-void
.end method

.method public onScrollStateChanged(I)V
    .locals 0

    if-nez p1, :cond_0

    .line 1
    invoke-virtual {p0}, Lcom/baidu/mobads/component/XNativeView;->render()V

    :cond_0
    return-void
.end method

.method public onWindowFocusChanged(Z)V
    .locals 0

    if-eqz p1, :cond_0

    .line 1
    invoke-virtual {p0}, Lcom/baidu/mobads/component/XNativeView;->resume()V

    goto :goto_0

    .line 2
    :cond_0
    invoke-virtual {p0}, Lcom/baidu/mobads/component/XNativeView;->pause()V

    .line 3
    :goto_0
    invoke-super {p0, p1}, Landroid/widget/RelativeLayout;->onWindowFocusChanged(Z)V

    return-void
.end method

.method public pause()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Lcom/baidu/mobads/component/FeedPortraitVideoView;->pause()V

    :cond_0
    return-void
.end method

.method public render()V
    .locals 1

    .line 1
    invoke-direct {p0}, Lcom/baidu/mobads/component/XNativeView;->shouldAutoPlay()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 2
    invoke-direct {p0}, Lcom/baidu/mobads/component/XNativeView;->play()V

    :cond_0
    return-void
.end method

.method public resume()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Lcom/baidu/mobads/component/FeedPortraitVideoView;->resume()V

    :cond_0
    return-void
.end method

.method public setNativeItem(Lcom/baidu/mobad/feeds/NativeResponse;)V
    .locals 0

    .line 3
    check-cast p1, Lcom/baidu/mobad/feeds/XAdNativeResponse;

    iput-object p1, p0, Lcom/baidu/mobads/component/XNativeView;->mCurrentNativeItem:Lcom/baidu/mobad/feeds/XAdNativeResponse;

    .line 4
    invoke-direct {p0}, Lcom/baidu/mobads/component/XNativeView;->renderView()V

    return-void
.end method

.method public setNativeItem(Lcom/baidu/mobad/feeds/XAdNativeResponse;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/baidu/mobads/component/XNativeView;->mCurrentNativeItem:Lcom/baidu/mobad/feeds/XAdNativeResponse;

    .line 2
    invoke-direct {p0}, Lcom/baidu/mobads/component/XNativeView;->renderView()V

    return-void
.end method

.method public setNativeViewClickListener(Lcom/baidu/mobads/component/XNativeView$INativeViewClickListener;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/baidu/mobads/component/XNativeView;->mNativeViewListener:Lcom/baidu/mobads/component/XNativeView$INativeViewClickListener;

    return-void
.end method

.method public setVideoMute(Z)V
    .locals 1

    .line 1
    iput-boolean p1, p0, Lcom/baidu/mobads/component/XNativeView;->videoMute:Z

    .line 2
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {v0, p1}, Lcom/baidu/mobads/component/FeedPortraitVideoView;->setVideoMute(Z)V

    :cond_0
    return-void
.end method

.method public stop()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/component/XNativeView;->mVideoView:Lcom/baidu/mobads/component/FeedPortraitVideoView;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Lcom/baidu/mobads/component/FeedPortraitVideoView;->stop()V

    :cond_0
    return-void
.end method
